home *** CD-ROM | disk | FTP | other *** search
- <%@ Language=VBScript CODEPAGE=65001 %>
- <!--#include file="include/wmsLocStrings.inc"-->
- <!--#include file="include/wmsCommon.inc"-->
- <!--#include file="include/wmsHeader.inc"-->
- <!--#include file="include/wmsPageBanner.inc"-->
- <!--#include file="include/wmsServerHash.inc"-->
- <!--#include file="include/wmsPlugins.inc"-->
- <!--#include file="include/wmsError.inc"-->
- <%
- '+-------------------------------------------------------------------------
- '
- ' Microsoft Windows Media
- ' Copyright (C) Microsoft Corporation. All rights reserved.
- '
- ' File: CacheExpiration.asp
- '
- ' Contents: Stream splitting expiration property page
- '
- '--------------------------------------------------------------------------
-
- BeginErrorHandling
- ConnectToServer
- ConnectToPubPoint
-
- Const MAX_EXPIRATION_VAL = 8388607
-
- Dim szOp
- Dim szRadioOption
-
- Dim iPPindex
-
- Dim bBufferOnServer
- Dim enumBufferSetting
-
- Dim lExpirationVal
-
- Dim bFinished
- bFinished = FALSE
-
- szOp = GetPostOrQsVal("submit")
- if( 0 = Len( szOp ) ) then
- szOp = trim( posting( "submit" ) )
- end if
-
- if( 0 < Len( szOp ) ) then
- szRadioOption = GetPostOrQsVal( "expiration" )
- szSecsToExpire = GetPostOrQsVal( "secsToExpiration" )
- if( 0 < Len( szSecsToExpire ) ) then
- dwSecsToExpire = CDbl( szSecsToExpire )
- end if
- if( 0 = strcomp( szRadioOption, "1", vbTextCompare ) ) then
- if( dwSecsToExpire <= MAX_EXPIRATION_VAL ) then
- g_objPubPoint.CacheProxyExpiration = dwSecsToExpire
- end if
- Response.Redirect( "pubpoint_props.asp?server=" & g_strQueryStringServer & "&ppID=" & g_strPubPointID & "&category=" & g_strCategory & "&instance=" & g_strEncodedInstance )
- Response.Flush
- else
- g_objPubPoint.CacheProxyExpiration = szRadioOption
- Response.Redirect( "pubpoint_props.asp?server=" & g_strQueryStringServer & "&ppID=" & g_strPubPointID & "&category=" & g_strCategory & "&instance=" & g_strEncodedInstance )
- Response.Flush
- end if
- end if
-
- if( bFinished ) then
- Response.Redirect( "pubpoint_props.asp?server=" & g_strQueryStringServer & "&ppID=" & g_strPubPointID & "&category=" & g_strCategory & "&instance=" & g_strEncodedInstance )
- end if
-
- WriteHTMLHeader( RemoveDangerousCharacters( g_strDecodedInstance ) ) %>
- <% WritePluginJSUtils %>
- <link rel="stylesheet" type="text/css" href="<%= Session( "cssName" ) %>">
- <script language="javascript">
- /*@cc_on @*/
-
- //////////////////////////////////////////////////////////////////////////
- function EnableButtons()
- {
- <% jsTRY %>
- document.forms.pluginForm.secsToExpiration.disabled = ! ( document.forms.pluginForm.expiration[0].checked );
- ValidateExpiration();
- <% jsCATCH %>
- }
-
- var g_bAlreadyAlertedUser = false;
- var g_bAlertToValueOutOfRange = false;
-
- //////////////////////////////////////////////////////////////////////////
- function ValidateExpiration()
- {
- <% jsTRY %>
- if( document.forms.pluginForm.expiration[ 0 ].checked )
- {
- var szTextEdit;
- szTextEdit = document.forms.pluginForm.secsToExpiration.value;
-
- if( isNaN( szTextEdit ) )
- {
- <% if brMSIE = g_dwBrowserType then %>
- if( ( ! g_bAlreadyAlertedUser ) && document.forms.pluginForm.secsToExpiration.style.color != "#ff0000" )
- <% else %>
- if( ( ! g_bAlreadyAlertedUser ) && document.forms.pluginForm.secsToExpiration.style.color != "rgb(255,0,0)" )
- <% end if %>
- {
- g_bAlreadyAlertedUser = true;
- window.alert( "<%= RemoveDangerousCharacters( L_INVALIDENTRY_TEXT ) %>" );
- }
- else
- {
- window.status = "<%= RemoveDangerousCharacters( L_INVALIDENTRY_TEXT ) %>";
- }
- document.forms.pluginForm.secsToExpiration.style.color = "#ff0000";
- document.forms.pluginForm.ok.disabled = true;
- // document.forms.pluginForm.secsToExpiration.value = "";
- return( true );
- }
-
- if( <%= Server.HTMLEncode( MAX_EXPIRATION_VAL ) %> < szTextEdit )
- {
- if( ! g_bAlertToValueOutOfRange )
- {
- g_bAlertToValueOutOfRange = true;
- window.alert( "<%= RemoveDangerousCharacters( L_VALOUTOFRANGE_TEXT ) %>" );
- }
- // document.forms.pluginForm.secsToExpiration.value = "<%= Server.HTMLEncode( MAX_EXPIRATION ) %>";
- document.forms.pluginForm.secsToExpiration.style.color = "#ff0000";
- document.forms.pluginForm.ok.disabled = true;
- return( true );
- }
- else
- {
- if( 0 >= szTextEdit )
- {
- document.forms.pluginForm.secsToExpiration.style.color = "#ff0000";
- document.forms.pluginForm.ok.disabled = true;
- return( false );
- }
- }
- }
- document.pluginForm.secsToExpiration.style.color = "#000000";
- document.forms.pluginForm.ok.disabled = false;
- window.status = "";
- return( false );
- <% jsCATCH %>
- }
- </script>
- </head>
- <body class="pluginBody" oncontextmenu="JavaScript:event.cancelBubble=true;return false;">
- <%
- if( WMS_PUBLISHING_POINT_TYPE_BROADCAST = g_objPubPoint.Type ) then
- DrawPropPageBanner L_CACHEPROXSPPROP_TEXT
- else
- DrawPropPageBanner L_CACHEPROXSPPROPOD_TEXT
- end if
- %>
- <table border="0" cellpadding="0" cellspacing="0" width="90%">
- <tr>
- <td>
-
- </td>
- <td valign="top">
-
- <% WriteStdPluginForm %>
-
- <p> <br>
- <%
- lExpiration = g_objPubPoint.CacheProxyExpiration
- %>
- <table class="propgroupbox" cellspacing="1" cellpadding="0" border="0" width="90%">
- <tr>
- <td colspan="3">
- <div class="subheader"><%= Server.HTMLEncode( L_CACHEEXPNAME_TEXT ) %></div><br>
- <table cellspacing="1" cellpadding="0" border="0">
- <tr>
- <td> </td>
- <td>
- <div class="propshand">
- <input type="radio"
- name="expiration"
- id="radio1"
- value="1"
- tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %>
- <% if lExpiration > 0 then %> checked <% end if %>
- onClick="JavaScript:document.forms.pluginForm.expiration[0].checked = true;EnableButtons();"
- >
- <label for="radio1" class="propshand"><span nowrap><% RenderWithErrorCheck Server.HTMLEncode( L_CPMAFTER_TEXT ), "enable" %></nowrap></label>
- </div>
- </td>
- <td>
- <input type="text"
- name="secsToExpiration" <%
- if( 0 >= lExpiration ) then%>disabled<%
- end if
- %>
- maxlenth=7
- value="<% if( 0 < lExpiration ) then %><%= lExpiration %><% else %>86400<% end if %>"
- onClick="JavaScript:EnableButtons();"
- onChange="JavaScript:ValidateExpiration();"
- onPaste="JavaScript:ValidateExpiration();"
- onKeyUp="JavaScript:ValidateExpiration();"
- tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %>
- >
- </td>
- </tr>
- <tr>
- <td> </td>
- <td>
- <div class="propshand">
- <input type="radio"
- name="expiration"
- id="radio2"
- value="0"
- tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %>
- <% if 0 = lExpiration then %> checked <% end if %>
- onClick="JavaScript:EnableButtons();"
- onChange="JavaScript:EnableButtons();"
- >
- <label for="radio2" class="propshand"><span nowrap><% RenderWithErrorCheck Server.HTMLEncode( L_CPMIMMED_TEXT ), "enable" %></span></label>
- </div>
- </td>
- </tr>
- <tr>
- <td> </td>
- <td>
- <div class="propshand">
- <input type="radio"
- name="expiration"
- id="radio3"
- value="-1"
- tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %>
- <% if -1 = lExpiration then %> checked <% end if %>
- onClick="JavaScript:EnableButtons();"
- onChange="JavaScript:EnableButtons();"
- >
- <label for="radio3" class="propshand"><span nowrap><% RenderWithErrorCheck Server.HTMLEncode( L_CPMNEVER_TEXT ), "enable" %></span></label>
- </div>
- </td>
- </tr>
- </table>
- <br>
- </td>
- </tr>
- </table>
- <table cellspacing="0" cellpadding="0" border="0">
- <tr>
- <td valign=bottom>
- <br>
- <input type="submit" align="baseline" name="ok" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> value="<%= Server.HTMLEncode( L_OKAYBUTTON_TEXT ) %>">
- <input type="button" align="baseline" name="cancel" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> onclick="JavaScript:Cancel();" value="<%= Server.HTMLEncode( L_CANCELBUTTONSPACED_TEXT ) %>">
- <input type="button" align="baseline" name="help" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> onclick="JavaScript:DoPluginHelp( '<%= H_CACHEPROXYTOPIC %>' )" value="<%= Server.HTMLEncode( L_HELPBUTTONSPACED_TEXT ) %>" id="help">
- </td>
- </tr>
- </table>
- </font>
- </form>
-
- <%
- AlertUserWithPopupErrorDialog
- OnErrorGoBack
- DrawCopyrightInfo
- DrawStdFooter
- %>
- </body>
- </html>
- <%
- LatchCurrentPage "pubpoints/cacheexpiration.asp", qs
- EndErrorHandling "CacheExpiration.asp"
-
- PluginsASPCleanup
- %>
-